package cn.broadsense.web.controller;

import cn.broadsense.biz.domain.AppVersion;
import cn.broadsense.biz.service.AppVersionService;
import cn.broadsense.common.annotation.Anonymous;
import cn.broadsense.common.core.domain.R;
import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
import cn.hutool.crypto.symmetric.SymmetricCrypto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huangjinshi
 * @description
 * @createDate 2023-09-25 10:46:44
 */
@Slf4j
@RestController
@RequestMapping("/api/v1/version")
@Api(tags = "App版本模块")
public class AppVersionController {

    @Autowired
    private AppVersionService appVersionService;


    @GetMapping("/latest")
    @ApiOperation("获取最新版本")
    @Anonymous
    public R<AppVersion> getLatest() {
        AppVersion appVersion = appVersionService.getLatest();
        return R.ok(appVersion);
    }
}
